package cn.zysoft.his4killsession.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.zysoft.his4killsession.pojo.BlockInfo;
import cn.zysoft.his4killsession.service.BlockInfoService;

@Controller
@RequestMapping("/manager")
public class MainController {
	@Autowired
	private BlockInfoService blockInfoService;

	@RequestMapping("/toManager.do")
	public String toManager() {
		return "/WEB-INF/jsp/manager/index";
	}

	@RequestMapping("/cleanSession.do")
	@ResponseBody
	public List<BlockInfo> cleanSession(Model model) {
		List<BlockInfo> blockInfos = blockInfoService.selectBlockInfo();
		return blockInfos;
	}
}
